<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<base herf="<%=basePath%>">
        <link href="<%=basePath%>static2/assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="<%=basePath%>static2/css/style.css"/>       
        <link href="<%=basePath%>static2/assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="<%=basePath%>static2/assets/css/ace.min.css" />
        <link rel="stylesheet" href="<%=basePath%>static2/assets/css/font-awesome.min.css" />
		
			<script src="<%=basePath%>static2/assets/js/jquery.min.js"></script>

		<script type="text/javascript">
			window.jQuery || document.write("<script src='<%=basePath%>static2/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<%=basePath%>static2/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="<%=basePath%>static2/assets/js/bootstrap.min.js"></script>
		<script src="<%=basePath%>static2/assets/js/typeahead-bs2.min.js"></script>
		<!-- page specific plugin scripts -->
		<script src="<%=basePath%>static2/assets/js/jquery.dataTables.min.js"></script>
		<script src="<%=basePath%>static2/assets/js/jquery.dataTables.bootstrap.js"></script>
        <script type="text/javascript" src="<%=basePath%>static2/js/H-ui.js"></script> 
        <script type="text/javascript" src="<%=basePath%>static2/js/H-ui.admin.js"></script> 
        <script src="<%=basePath%>static2/assets/layer/layer.js" type="text/javascript" ></script>
        <script src="<%=basePath%>static2/assets/laydate/laydate.js" type="text/javascript"></script>
        <script type="text/javascript">
$(document).ready(function(){
	 
});
function member_del(obj,id){
	//alert("zhixingledianji");
	//alert(id);
	//var ctxpath="${basePath}";
	layer.confirm('确认要删除吗？',function(index){
		//alert("进入了layer");
		$.ajax({
			type:"POST",
			url:"${basePath }delnoticebyid",
			data:{noticeid:id},
			dataType:"json",
			success:function(data){
				//alert("okk");
			}
		});
		$(obj).parents("tr").remove();
		layer.msg('已删除!',{icon:1,time:1000});
	});
}

</script>
<title>公告列表</title>
</head>

<body>
	<div class="page-content clearfix">
		<div id="Member_Ratings">
			<div class="d_Confirm_Order_style">
				<div class="search_style">
					<form action="<%=basePath%>goods/DimSearch" class="input-group">
						<ul class="search_content clearfix">
							<li><label class="l_f">公告标题</label><input name="goods_dimSearch"
								type="text" class="text_add" placeholder="输入公告标题"
								style="width: 400px" /></li>
							<li style="width: 90px;"><button type="submit"
									class="btn_search">
									<i class="icon-search"></i>查询
								</button></li>
						</ul>
					</form>
				</div>
				<!---->
				<div class="border clearfix">
					<%--<span class="l_f"> <a href="${pageContext.request.contextPath}jsp/admin/noticeManager-addNotice.jsp"
						id="member_add" class="btn btn-warning"><i class="icon-plus"></i>添加公告</a>
					</span>--%>
					<a href="${pageContext.request.contextPath}/jsp/admin/noticeManager-addNotice.jsp">添加公告</a>
				</div>
				<!---->
				<div class="table_menu_list">
					<table class="table table-striped table-bordered table-hover"
						id="sample-table">
						<thead>
							<tr>
								<th width="25"><label><input type="checkbox"
										class="ace"><span class="lbl"></span></label></th>
								<th width="350">标题</th>	
								<th width="120">创建时间</th>
								<th width="250">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${noticeList}" var="notice">
								<div>
									<tr>
										<td><label><input type="checkbox" class="ace"><span
												class="lbl"></span></label></td>
										
										<td>${notice.title}</td>
										<td><fmt:formatDate value="${notice.create_time }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
										<td class="td-manage"><%--<a title="查看"
											 href="${notice.url}"
											class="btn btn-xs btn-info"><i
												class="icon-edit bigger-120"></i></a>--%> <a title="删除"
											href="javascript:;"
											onclick="member_del(this,'${notice.sysid }')"
											class="btn btn-xs btn-warning"><i
												class="icon-trash  bigger-120"></i></a></td>
									</tr>
								</div>
							</c:forEach>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
	
</body>
</html>
